package FileIO;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 故我
 * Date: 2023-10-19
 * Time: 20:14
 */
public class IODemo8 {
    public static void main(String[] args)  {
        // 字符流的操作
        try(Reader reader = new FileReader("e:/IO/test.txt")) {
            while(true){
                int ch = reader.read();
                if(ch == -1){
                    break;
                }
                System.out.print((char)ch);
            }
        } catch(IOException e){
            e.printStackTrace();
        }
    }
}
